using System.ComponentModel.DataAnnotations;

namespace SmartCustomerService.Web.Models;

/// <summary>
/// 聊天请求模型
/// </summary>
public class ChatRequest
{
    /// <summary>
    /// 用户消息内容
    /// </summary>
    /// <example>你好，我想了解一下你们的产品</example>
    [Required(ErrorMessage = "消息内容不能为空")]
    [StringLength(1000, ErrorMessage = "消息长度不能超过1000个字符")]
    public string Message { get; set; } = string.Empty;
    
    /// <summary>
    /// 对话上下文（可选）
    /// </summary>
    /// <example>当前对话上下文：用户之前询问了产品功能...</example>
    [StringLength(5000, ErrorMessage = "对话上下文长度不能超过5000个字符")]
    public string Context { get; set; } = string.Empty;
}

/// <summary>
/// 聊天响应模型
/// </summary>
public class ChatResponse
{
    /// <summary>
    /// AI 回答内容
    /// </summary>
    /// <example>您好！很高兴为您服务，请问您想了解我们产品的哪个方面呢？</example>
    public string Message { get; set; } = string.Empty;
    
    /// <summary>
    /// 响应时间戳
    /// </summary>
    public DateTime Timestamp { get; set; }
    
    /// <summary>
    /// 请求是否成功
    /// </summary>
    public bool Success { get; set; }
}
